Skip to content

pass re.sub flags as kwargs#189

Open
sneakers-the-rat wants to merge 1 commit intoLibraryOfCongress:masterfrom
sneakers-the-rat:patch-1
Open

pass re.sub flags as kwargs#189
sneakers-the-rat wants to merge 1 commit intoLibraryOfCongress:masterfrom
sneakers-the-rat:patch-1

Conversation

@sneakers-the-rat
Copy link

hello :)

making some bags in testing, getting a DeprecationWarning:

tests/test_validation.py: 81 warnings
  .venv/bin/bagit.py:1412: DeprecationWarning: 'count' is passed as positional argument
    s = re.sub(r"%0D", "\r", s, re.IGNORECASE)

tests/test_validation.py: 81 warnings
  .venv/bin/bagit.py:1413: DeprecationWarning: 'count' is passed as positional argument
    s = re.sub(r"%0A", "\n", s, re.IGNORECASE)

looks like the flags are being interpreted as count, and we're also being warned that we need to pass extra args as kwargs anyway, so fixed that :)

deprecationwarning: 'count' is passed as positional argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant